package com.cloudlead.common.worker.desc;

import java.util.List;

/**
 * Created by dean on 2015/7/30.
 */
public class ModuleFacade {

    private final String facadeInterfaceName;

    private final List<String> interfaceParamters;

    public ModuleFacade(String facadeInterfaceName, List<String> interfaceParamters) {
        this.facadeInterfaceName = facadeInterfaceName;
        this.interfaceParamters = interfaceParamters;
    }

    public String getFacadeInterfaceName() {
        return facadeInterfaceName;
    }

    public List<String> getInterfaceParamters() {
        return interfaceParamters;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ModuleFacade that = (ModuleFacade) o;

        if (!facadeInterfaceName.equals(that.facadeInterfaceName)) return false;
        return !(interfaceParamters != null ? !interfaceParamters.equals(that.interfaceParamters) : that.interfaceParamters != null);

    }

    @Override
    public int hashCode() {
        int result = facadeInterfaceName.hashCode();
        result = 31 * result + (interfaceParamters != null ? interfaceParamters.hashCode() : 0);
        return result;
    }
}
